package com.otod.sys.menu.bo;

import java.util.List;

public class MenuTreeBO implements Comparable<MenuTreeBO> {
	private String id = null; 
	private String name = null;
	private String type = null;
	private String parentId = null;
	private String url = null;
	private boolean hasChild = false;
	private Integer menuOrder = null;
	private List<MenuTreeBO> data = null;
//	private List<MenuBO> additionalParameters = null;
	
	public int compareTo(MenuTreeBO o) {
		if(this.getMenuOrder() != null && o.getMenuOrder() != null){
			return this.getMenuOrder().intValue() - o.getMenuOrder().intValue();
		} else if (this.getMenuOrder() != null){
			return this.getMenuOrder().intValue();
		} else {
			return -1;
		}
	}
	
	
	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public String getType() {
		return type;
	}


	public void setType(String type) {
		this.type = type;
	}


	public String getParentId() {
		return parentId;
	}


	public void setParentId(String parentId) {
		this.parentId = parentId;
	}


	public List<MenuTreeBO> getData() {
		return data;
	}


	public void setData(List<MenuTreeBO> data) {
		this.data = data;
	}


	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}


	public boolean isHasChild() {
		return hasChild;
	}


	public void setHasChild(boolean hasChild) {
		this.hasChild = hasChild;
	}


	public Integer getMenuOrder() {
		return menuOrder;
	}


	public void setMenuOrder(Integer menuOrder) {
		this.menuOrder = menuOrder;
	}
	

//	public List<MenuBO> getAdditionalParameters() {
//		return additionalParameters;
//	}
//
//
//	public void setAdditionalParameters(List<MenuBO> additionalParameters) {
//		this.additionalParameters = additionalParameters;
//	}
	
	
}
